{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Demo - Bayesian Neural Network Regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from sklearn import datasets\n",
    "\n",
    "import torch\n",
    "import torch.nn as nn\n",
    "import torch.optim as optim\n",
    "\n",
    "import torchbnn as bnn"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1. Generate Sample Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAD8CAYAAABzTgP2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3X+UXWV97/H3d04OyUmwTJAoMiSEWla40kgiU8Tm3rtErVFUGAMKXm1t672pvbrWhXKzmlRXjV22xOZa+sO2Nq2u1VaKAQ1jFGrQQq8tdwUNTkKIJBWQXycsicKgMiM5M/O9f5yzhz179t5nnx/7nJk5n9das3J+7DnnmTOT/d3P83yf72PujoiISKCv2w0QEZG5RYFBRERmUGAQEZEZFBhERGQGBQYREZlBgUFERGZQYBARkRkUGEREZIZcA4OZrTGzg6GvH5vZtZFjXm9mz4WO+f082yQiIukW5fni7n4MWAdgZgWgDNwWc+i/ufvbs77uGWec4atXr25LG0VEesV99933Q3dfUe+4XANDxBuBh939sVZfaPXq1Rw4cKANTRIR6R1mlun828k5hmuAmxOee52ZHTKzfzazCzrYJhERiehIYDCzU4DLgVtjnv4OcI67Xwj8BTCc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59TO2i5DngpTm1p5F2AVxZG374opmtzLlNWczl/3uvM7NDZvbPtaKgHVUbglwP3Bt5KtfPrNWNeuYMM/sGcGbMUx9x9y/XjvkIMAHcFPcSMY+1nLKVpV0ZbPDqpkcvA75uZkdrVzvdbFfbP6+0NjXwMqtqn9XPA3eZ2WFPKOLYgiw/ey5/T3Vkec+vADe7+wtm9kGqvZrYHRY7qBufVRbfoVpC4qdW3V1yGDivU29uZqcCXwKudfcfR5+O+Za2fWYLJjB4nSqwZvZ+4O3AG702SBfxJBC+ejobOJ53uzK+xvHav0+b2W1UhwxaCgxtaFfbP6+0NpnZD8zsFe7+VK3L/HTCawSf1SNm9q9Ur7baHRiy/OzBMU+a2SLgNPIftqjbLnf/Ueju31Kdc+u2XP7vtSp8Mnb3O8zsr8zsDHfPvYaSmRWpBoWb3H1PzCG5fmY9MZRkZm8Bfhe43N3HEg77NnCemZ1rZqdQnTDMLaslKzNbZmYvCW5TnUifC1VoO/157QXeX7v9fmBWr8bMlpvZ4trtM4ANwHdzaEuWnz3c3quAuxIuSDrarsg49OVUx6+7bS/wa7VMm0uA5zxDMc28mdmZwbyQmV1M9Xz5o/Tvasv7GvBZ4EF3/5OEw/L9zDo9496NL+AhquNxB2tfQbbIWcAdoeMuo5oB8DDVIZW82/VOqpH/BeAHwL5ou6hmmByqfR2ZK+3q9OdFdXz+X6hW7P0X4PTa44PA39Vu/zJwuPZZHQY+kGN7Zv3swB9QvfgAWALcWvvb+xbw83n/3jK264ba39Eh4G7g/A606WaqG3FVan9XHwA+CHyw9rwBf1lr82FSMvQ63K4Phz6r/cAvd6hd/5nqsND9oXPWZZ38zLTyWUREZuiJoSQREclOgUFERGZQYBARkRkUGEREZAYFBhERmUGBQUREZlBgEBGRGRQYRERkhv8PoLpHy/Bb+NwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = torch.linspace(-2, 2, 500)\n",
    "y = x.pow(3) - x.pow(2) + 3*torch.rand(x.size())\n",
    "x = torch.unsqueeze(x, dim=1)\n",
    "y = torch.unsqueeze(y, dim=1)\n",
    "\n",
    "plt.scatter(x.data.numpy(), y.data.numpy())\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. Define Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = nn.Sequential(\n",
    "    bnn.BayesLinear(prior_mu=0, prior_sigma=0.1, in_features=1, out_features=100),\n",
    "    nn.ReLU(),\n",
    "    bnn.BayesLinear(prior_mu=0, prior_sigma=0.1, in_features=100, out_features=1),\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "mse_loss = nn.MSELoss()\n",
    "kl_loss = bnn.BKLLoss(reduction='mean', last_layer_only=False)\n",
    "kl_weight = 0.01\n",
    "\n",
    "optimizer = optim.Adam(model.parameters(), lr=0.01)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3. Train Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "kl_weight = 0.1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "- MSE : 0.89, KL : 5.19\n"
     ]
    }
   ],
   "source": [
    "for step in range(3000):\n",
    "    pre = model(x)\n",
    "    mse = mse_loss(pre, y)\n",
    "    kl = kl_loss(model)\n",
    "    cost = mse + kl_weight*kl\n",
    "    \n",
    "    optimizer.zero_grad()\n",
    "    cost.backward()\n",
    "    optimizer.step()\n",
    "    \n",
    "print('- MSE : %2.2f, KL : %2.2f' % (mse.item(), kl.item()))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4. Test Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "x_test = torch.linspace(-2, 2, 500)\n",
    "y_test = x_test.pow(3) - x_test.pow(2) + 3*torch.rand(x_test.size())\n",
    "\n",
    "x_test = torch.unsqueeze(x_test, dim=1)\n",
    "y_test = torch.unsqueeze(y_test, dim=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAEKCAYAAAAxXHOuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzs3XlcVOX+wPHPwyLgiuK+a5q74pKI5ZYpZGbp1cxsUW+atljWrWv2uyK3W9dWq9tqlpZZmqaVLWKmlgouWGjuW2pqbiiuIALf3x/D0ABnYAaG/ft+vebFzDnPOec7A5zvPM9zzvMYEUEppZTyFK+iDkAppVTpoolFKaWUR2liUUop5VGaWJRSSnmUJhallFIepYlFKaWUR2liUUop5VGaWJRSSnmUJhallFIe5VPUARSF6tWrS+PGjYs6DKWUKlE2b958WkRq5FauTCaWxo0bExsbW9RhKKVUiWKMOeRKOW0KU0op5VGaWJRSSnmUJhallFIeVSb7WKxcvXqVI0eOkJSUVNShqELi7+9P/fr18fX1LepQlCpVNLGkO3LkCJUqVaJx48YYY4o6HFXARIT4+HiOHDlCkyZNijocpUoVbQpLl5SURFBQkCaVMsIYQ1BQkNZQlSoAmlgcaFIpW/T3rVTB0MSilFKlXExMDOHh4cTExBTK8TSxFCPe3t4EBwdnPA4ePEhsbCwTJ050eR8JCQm8/fbbuR6jbdu2DBs2jMuXL+c53tWrVzNw4EAAvv76a6ZPn+5yXMeOHWPo0KF5PrZSynWRkZFERUURGRlZOAcUkTL36Ny5s2S1Y8eObMsKW4UKFVwue/XqVcvlv//+u7Rp08alY9x1113yyiuvZFqflpYmqampLsWwatUqueWWW1wqm1tcRaU4/N6VKmjR0dESFhYm0dHR+doPECsunGO1xpKVMQX/cINjrWDatGmMGzeO/v37c++997J9+3a6du1KcHAw7du3Z+/evUyePJn9+/cTHBzMk08+meO+e/Towb59+zh48CCtWrXiwQcfpFOnTvzxxx8sX76c0NBQOnXqxLBhw7h48SIAy5Yto2XLltxwww0sXrw4Y19z5szh4YcfBuDEiRMMHjyYDh060KFDB6Kjo7PFdfDgQdq2bQvYLpwYPXo07dq1o2PHjqxatSpjn0OGDCE8PJzmzZvz1FNPufXZKVXW2ZvAwPa/GxoaWijH1cuNi5HExESCg4MBaNKkCUuWLMlWZvPmzaxdu5aAgAAeeeQRHn30UUaOHElycjKpqalMnz6dbdu2ERcXl+OxUlJS+P777zP+6Hbv3s3s2bN5++23OX36NP/5z39YsWIFFSpU4IUXXuDVV1/lqaeeYuzYsaxcuZJmzZoxfPhwy31PnDiRXr16sWTJElJTU7l48WK2uA4ePJhR/q233gLgt99+Y9euXfTv3589e/YAEBcXx6+//oqfnx8tWrTgkUceoUGDBu59sEqVUfYmMLAllsKiNZZiJCAggLi4OOLi4iyTCsCgQYMICAgAIDQ0lOeff54XXniBQ4cOZSzPiT15denShYYNG/L3v/8dgEaNGtGtWzcA1q9fz44dO7j++usJDg7mo48+4tChQ+zatYsmTZrQvHlzjDHcfffdlsdYuXIlEyZMAGx9OlWqVMkxprVr13LPPfcA0LJlSxo1apSRWPr27UuVKlXw9/endevWHDrk0hh4SikgIiKCsLAwIiIiCrUDX2ssJUyFChUynt91112EhITw7bffEhYWxqxZs2jatGmO29uTV077FRH69evHZ599lqlMXFxcgVyia2u6tebn55fx3Nvbm5SUFI8fX6nSKjQ0NKOmEh4eXmi1F62xlGAHDhygadOmTJw4kUGDBrF161YqVarEhQsX8rXfbt26sW7dOvbt2wfA5cuX2bNnDy1btuT3339n//79ANkSj13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VZjYEJN1CuvLfnIuKrXQuLGYty2cMHidd1e9PSfe2HJLZQFxYzFok6TLgMLA3IqaBZ4CnWw3KbED+jsXMzIryJxYzMyvKhcXMzIpyYTEzs6JcWMzMrCgXFjMzK8qFxczMinJhMTOzolxYzMysqP8AA50mzebSj+QAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.xlabel(r'$x$')\n",
    "plt.ylabel(r'$y$')\n",
    "\n",
    "plt.scatter(x_test.data.numpy(), y_test.data.numpy(), color='k', s=2) \n",
    "\n",
    "y_predict = model(x_test)\n",
    "plt.plot(x_test.data.numpy(), y_predict.data.numpy(), 'r-', linewidth=5, label='First Prediction')\n",
    "\n",
    "y_predict = model(x_test)\n",
    "plt.plot(x_test.data.numpy(), y_predict.data.numpy(), 'b-', linewidth=5, label='Second Prediction')\n",
    "\n",
    "y_predict = model(x_test)\n",
    "plt.plot(x_test.data.numpy(), y_predict.data.numpy(), 'g-', linewidth=5, label='Third Prediction')\n",
    "\n",
    "plt.legend()\n",
    "\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
